package cn.id68.www.http.builder;

import java.util.LinkedHashMap;
import java.util.Map;

import cn.id68.www.http.RequestCall;
import cn.id68.www.http.request.OkHttpRequest;

/**
 * Created by Administrator on 2017/3/20.
 */
public class GetBuilder extends OkHttpRequestBuilder<GetBuilder> implements HasParamsable {



    @Override
    public OkHttpRequestBuilder params(Map<String, String> params) {
        this.params = params;
        return this;
    }

    @Override
    public OkHttpRequestBuilder addParams(String key, String val) {
        if (params == null){
            params = new LinkedHashMap<>();
        }
        params.put(key,val);
        return this;
    }

    @Override
    public RequestCall build() {
        return new GetBuilder().build();
    }

}
